<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<table class="table">
    <tr style="border-bottom:1px solid #ddd; ">

        <td style="border: none;">

            <ul class="pagination pagination-sm" style="width: auto;margin: auto;">

                <li>
                    <a href="javascript:jumpPage(1)">首页</a>
                </li>
                <li>
                    <a href="javascript:jumpPage(${pageData.pagination.prevPage})">上一页</a>
                </li>


                <c:if test="${pageData.pagination.pageNo > 1}">
                    <c:forEach var="pageNo2" end="${pageData.pagination.pageNo - 1}"
                               begin="${(pageData.pagination.pageNo - 3) > 0 ? (pageData.pagination.pageNo - 3): ((pageData.pagination.pageNo - 2)>0?(pageData.pagination.pageNo - 2):1)}">
                        <li>
                            <a href="javascript:jumpPage(${pageNo2});">${pageNo2}</a>
                        </li>
                    </c:forEach>
                </c:if>
                <li class="active">
                    <a href="javascript:jumpPage(${pageData.pagination.pageNo});" >
                        ${pageData.pagination.pageNo}
                    </a>
                </li>
                <c:if test="${pageData.pagination.totalPage > pageData.pagination.pageNo}">
                    <c:forEach var="pageNo" begin="${pageData.pagination.pageNo + 1}"
                               end="${(pageData.pagination.pageNo + 3) > pageData.pagination.totalPage ? pageData.pagination.totalPage: (pageData.pagination.pageNo + 3)}">
                        <li>
                            <a href="javascript:jumpPage(${pageNo});">${pageNo}</a>
                        </li>
                    </c:forEach>
                </c:if>
                <li>
                    <a href="javascript:jumpPage(${pageData.pagination.nextPage})">下一页</a>
                </li>
                <li>
                    <a href="javascript:jumpPage(${pageData.pagination.totalPage})">尾页</a>
                </li>
            </ul>
        </td>
        <td class="text-right text-muted" style="border: none;vertical-align: middle;"> 第${pageData.pagination.pageNo}页，
            共${pageData.pagination.totalPage}页，
            共${pageData.pagination.totalCount}条数据
        </td>
    </tr>
</table>
</div>
